<template>
  <div>
    <h2>{{message}}</h2>
    <h2>{{text}}</h2>
    <button @click="updateFather">点击给father传信息</button>  
  </div>
</template>
<script>
export default {
  name:'TestSon',
  props: {
    message: {
      type: String,
      default: '你好啊,世界!'
    },
  },
  data() {
    return {
      text:'我是son'
    }
  },
  methods: {
    changeText(){
      this.text='我是son,但是father改变了我'
    },
    updateFather(){
      this.$bus.$emit('changeFather','son的信息来了!')
    },
  }
}
</script>
